package com.yuexunit.finance.system.service;

import com.yuexunit.finance.system.entity.DistrictInfoEntity;
import com.yuexunit.inject.annotation.Implements;
import com.yuexunit.persist.PersistUtil;
import com.yuexunit.persist.annotation.Transactional;

/**
*@version 创建时间：2016年12月14日 下午5:02:48
*@author wenwenlong
*类说明
*/

@Implements(DistrictInfoService.class)
public class DistrictInfoServiceImpl implements DistrictInfoService {

	@Override
	@Transactional
	public Long createDistrictInfo(DistrictInfoEntity entity) {
		PersistUtil.insert(entity);
		return entity.getDistrictCode();
	}

	@Override
	public DistrictInfoEntity inquireDistrictInfo(Long districtId) {
		return PersistUtil.get(DistrictInfoEntity.class, districtId);
	}

	@Override
	@Transactional
	public void updateDistrictInfo(DistrictInfoEntity entity) {
		PersistUtil.update(entity);
	}
}
